# Maintainer: Jonas Witschel <diabonas@archlinux.org>
pkgname=mpv-mpris
pkgver=0.9
pkgrel=1
pkgdesc='MPRIS plugin for mpv'
arch=('loong64' 'x86_64')
url='https://github.com/hoyon/mpv-mpris'
license=('MIT')
depends=('glib2' 'mpv')
checkdepends=('jq' 'playerctl' 'socat' 'sound-theme-freedesktop' 'xorg-server-xvfb')
options=('debug')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha512sums=('82845320fe8d1ce903e8c9027070339d0281ace3887743728df0c0b4abb12de59bd7e86927d86b2669c54f80fee03d5f65e2c086ddafd5bcf55039db51bf64fc')

build() {
	cd "$pkgname-$pkgver"
	make
}

check() {
	cd "$pkgname-$pkgver"
	make test
}

package() {
	cd "$pkgname-$pkgver"
	make PREFIX=/usr DESTDIR="$pkgdir" install
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
